import http from '@/utils/request';

export default {
    async getMenuList(params){
        return await http.get("/api/permission/list",params);
    },
    async getParentMenuList(params) {
        return await http.get("/api/permission/parent/list", params)
    },
    async addMenu(params){
        return await http.post("/api/permission/add",params)
    },
    async updateMenu(params){
        return await http.put("/api/permission/update",params)
    },
    async checkPermission(param){
        return await http.getRestApi("/api/permission/check",param);
    },
    /**
    * 删除菜单
    * @returns
    */
    async deleteById(params) {
        return await http.delete("/api/permission/delete", params);
    }
}